Vue.createApp({
    data(){
        return{
            num:10
        }
    },
    methods:{
        add(v){
            this.num += v;
        },
        reduce(v){
            this.num -= v;
        }
    }
}).mount("#root");

Vue.createApp({
    data(){
        return{
            x:0,
            y:0,
        }
    },
    methods:{
        mousehandle(event){
            this.x = event.offsetX;
            this.y = event.offsetY;
        }
    }
}).mount("#root1");

Vue.createApp({
    methods:{
        bighandle(event){
            event.currentTarget.style.backgroundColor = 'red'
        },
        smallhandle(event){
            event.currentTarget.style.backgroundColor = 'blue'
            //event.stopPropagation();//阻止事件冒泡
        },
    }
}).mount("#root2");

Vue.createApp({
    methods:{
        abtn(event){
            console.log("aaa"),
            event.preventPropagation();
        },
    }
}).mount("#root3");